{template 'common/header'}
<link rel="stylesheet" href="../addons/kuyuan_red/dist/web/common.css" />
<link rel="stylesheet" href="../addons/kuyuan_red/dist/web/base-setting.css" />
<div id="louie" data-url="{php echo $this->createWebUrl('api')}">
    {template 'web/setting/common/nav/nav'}
    <form action="" method="post" class="row col-xs-6" v-on:submit.prevent="submit">
        <multi-sync></multi-sync>

        <div class="form-group">
            <label>前端首页标题</label>
            <input type="text" v-model.trim="web_name" class="form-control" placeholder="前端首页标题" />
        </div>

        <div class="form-group">
            <label>是否开启手机认证功能</label><br />
            <label class="radio-inline">
                <input type="radio" name="open_phone" v-model="open_phone" value="0"> 不开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="open_phone" v-model="open_phone" value="1"> 开启
            </label>
        </div>

        <div class="form-group" v-if="open_phone == 1">
            <label>是否强制用户认证手机后领红包</label><br />
            <label class="radio-inline">
                <input type="radio" name="coerce_phone" v-model="coerce_phone" value="0"> 不强制
            </label>
            <label class="radio-inline">
                <input type="radio" name="coerce_phone" v-model="coerce_phone" value="1"> 强制
            </label>
        </div>

        <div class="form-group">
            <label>绑定管理员</label>
            <div class="bind-admin" @click="clickBindAdmin">
                <img :src="admin_src" />
            </div>
        </div>

        <div class="form-group">
            <label>公告</label>
            <textarea class="form-control" rows="3" v-model.trim="notice"></textarea>
        </div>

        <div class="form-group">
            <label>是否对外开放发红包功能</label><br />
            <label class="radio-inline">
                <input type="radio" name="publish_red" v-model="publish_red" value="0"> 不开放
            </label>
            <label class="radio-inline">
                <input type="radio" name="publish_red" v-model="publish_red" value="1"> 开放
            </label>
            <br />
            <a v-if="publish_red === '0'" class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('publish_person')}" type="button">可发红包人员管理</a>
        </div>

        <div class="form-group">
            <label>是否开启主域名防封功能</label><br />
            <label class="radio-inline">
                <input type="radio" name="defend" v-model="defend" value="0" @change="defendChange"> 不开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="defend" v-model="defend" value="1" @change="defendChange"> 开启
            </label>
        </div>

        <button class="btn btn-primary" type="submit">确认设置</button>
    </form>

    <!--S绑定管理员二维码-->
    <modal id="bind-admin-qrcode" name="bind-admin-qrcode" @before-open="beforeOpenAdminQrcode" @closed="closeAdminQrcode">
        <h2>扫一扫绑定管理员<i class="iconfont icon-guanbi" @click="clickCloseBindAdmin"></i></h2>
        <img :src="bind_admin_qrcode" />
    </modal>
    <!--E绑定管理员二维码-->

    <!--提示框--><v-dialog style="z-index:99999999;"/>
</div>
<script src="../addons/kuyuan_red/dist/web/common.js"></script>
<script src="../addons/kuyuan_red/dist/web/base-setting.js"></script>
{template 'common/footer'}